package com.yulei.framework.ioc;

import com.yulei.framework.ioc.core.AnnotationApplicationContext;
import com.yulei.framework.ioc.entity.Robot;

import java.lang.reflect.Field;

/**
 * @author yulei
 * date 2023/11/22 13:15
 */
public class Test {
    public static void main(String[] args) throws Exception {
//        JsonApplicationContext applicationContext = new JsonApplicationContext("application.json");
//        applicationContext.init();
//        Robot aiRobot = (Robot)applicationContext.getBean("robot");
//        aiRobot.show();
        AnnotationApplicationContext annotationApplicationContext = new AnnotationApplicationContext();
        annotationApplicationContext.init("com.yulei.framework.ioc.entity");
        Robot robot = (Robot) annotationApplicationContext.getBean("robot");
        robot.show();
    }
}
